<%@ page import="com.apexedu.portal.constant.Constants" %>
<%@ page import="com.apexedu.portal.entity.TFrontdeskNews" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
    request.setAttribute("basePath", basePath);
    TFrontdeskNews tfrontdesknews = (TFrontdeskNews) request.getAttribute("tfrontdesknews");
    String totalPages= (String)request.getAttribute("totalPages");
    String totalRows= (String)request.getAttribute("totalRows");
    String upid=(String)request.getAttribute("upid");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title><%=Constants.ProjectInfo.PROJECT_NAME%>
    </title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link href="${basePath}/resources/css/mh.shd.css" rel="stylesheet">
    <script type="text/javascript" src="${basePath}/resources/ui/js/jquery-1.8.3.js"></script>
    <style type="text/css">
        .section{background-color: #ffffff;border: 0px solid #eeeeee;height: 270px;}
        .section .title{float: left;border-bottom: 2px solid #f7f7f7;width: 100%;}
        .section .title{height: 60px;}
        .section .h3,.h5{float: left;height: 60px;line-height: 60px;}
        .section .h3{width: 130px;color: #2f2f2f;font-size: 18px;text-align: center;cursor: pointer;}
        .section .h3[class$="on"]{background-color: #f1f3f8;}
        .section .h5{width: 40px;color: #adadad;font-size: 12px;}
        .section .ul{height: 200px;float: left;width: 100%;}
        .section .li{background-color: #fafafa;margin-top: 7px;}
        .section .li,.foot{float: left;height: 30px;width: 97%;}
        .section .li span{max-width: 85%;float: left; white-space: nowrap;text-overflow: ellipsis;overflow: hidden;color: #adadad;margin-left: 5px;}
        .section .li .time{float: right;width: 50px;color: #adadad;}
        .section .li .time[class$="on"]{width: 85px;}
        .section .li span,.foot span,.li .time{height: 30px;line-height: 30px;font-size: 14px;display: block;}
        .section .li span,.foot span{text-align: left;cursor: pointer;}
        .section .foot{margin-top: 16px;}
        .section .foot span{width:130px;color: #629fe6;float: right;margin-right: 10px;}
        .section .li label{float: left;width: 60px;height: 20px;line-height: 20px;margin-left: 10px;font-size: 14px;color: #ffffff;margin-top: 5px;text-align: center;}
        .section .li label[class^="fq"]{width: 27px;height: 25px;margin-left: 2px;margin-top: 2px;background-position: 0px 0px;}
        .section .li label[class$="done"]{background-image: url("${basePath}/resources//images/shd/icon_done.png");}
        .section .li label[class$="stop"]{background-image: url("${basePath}/resources/images/shd/icon_stop.png");}
        .section .li .xz{background-color: #45b6af;}
        .section .li .dz{background-color: #f3565d;}
        .section .li .jw{background-color: #8bc5f2;}
        .section .li .xg{background-color: #deb952;}
        .section .li .hq{background-color: #c6c6c6;}
    </style>
    <script type="text/javascript">
        var temp=$(".ul").height();
        var totalPages=<%=totalPages%>;
        var pages=1;
        $(window).resize(function(){
            if (pages==1){
                searchlist();
                newslist();
            }
        });
        $(function(){
             if (pages==1){
                searchlist();
                newslist();
            }
        });
        function searchlist(){
            $("#searchlist").click(function(){
                newslist();
            })
        }

        function newslist(){
            if (totalPages > pages){
                var upid='<%=upid%>';
                $.post("${basePath}/s/uc/shd/fdnv/initiateprocess/"+upid+"-"+pages+"(6)",function(result){
                     if(result!='unlogoin'){
                        $(".ul").append(result);
                        temp=temp+225;
                        $(".ul").scrollTop(temp);
                    }
                });
                pages=pages+1;
            }else if (totalPages == pages){
                var upid='<%=upid%>';
                $.post("${basePath}/s/uc/shd/fdnv/initiateprocess/"+upid+"-"+pages+"(6)",function(result){
                    if(result!='unlogoin'){
                        $(".ul").append(result);
                        temp=temp+225;
                        $(".ul").scrollTop(temp);
                    }
                });
                pages=pages+1;
                $(".foot").hide();
            }else{
                $(".foot").hide();
            }
        }
        function gotoHtml(url){
            window.open('${basePath}/s/uc/yw/index?url='+url);
        }

    </script>
</head>
<body>
<div class="section">
    <div class="ul" style="overflow-y:auto;height: 223px;">
    </div>
    <div class="foot">
        <span id="searchlist">查看更多代办<a href="javascript:;" ><img alt="" src="${basePath}/resources/images/shd/icon_all.png" width="14" height="14" style="padding-left: 3px; vertical-align:middle;border: 0;"/></a></span>
    </div>
</div>
</body>
</html>